package com.zk.qqrobot.controller;

import com.zk.qqrobot.config.Constant;
import org.springframework.http.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/t")
public class TestController {

//    @GetMapping("/te")
//    public Object te(){
//        RestTemplate restTemplate = new RestTemplate();
////        List<MediaType> acceptableMediaTypes = new ArrayList<>();
////        acceptableMediaTypes.add(MediaType.ALL);
////        HttpHeaders header = new HttpHeaders();
////        header.setContentType(MediaType.TEXT_HTML);
////        header.setAccept(acceptableMediaTypes);
////        header.add("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36");
////        HttpEntity<String> requestEntity = new HttpEntity<String>(null, header);
////        ResponseEntity<String> exchange = restTemplate.exchange(Constant.YZZZ_URL, HttpMethod.GET, requestEntity, String.class);
//        return exchange.getBody();
//    }
}
